1. Field of Invention
The present invention relates to a programmable flyback power supply circuit and a control method thereof; particularly, it relates to such programmable flyback power supply circuit and control method thereof with improved over voltage protection.
2. Description of Related Art
FIGS. 1A and 1B show schematic diagrams of a conventional programmable flyback power supply circuit 100 and signal waveforms thereof, respectively. The flyback power supply circuit 100 can be programmed to provide plural different output voltages at an output node OUT, i.e., the output voltage Vout is programmable, for example as shown by the levels Vtrgt1 and Vtrgt2 of the programmable output voltage Vout1 in FIG. 1B. Referring to FIG. 1A, a rectifier circuit 101 rectifies an alternating current (AC) voltage Vac to generate an input voltage Vin. The rectifier circuit 101 is for example a bridge rectifier circuit. A transformer circuit 102 of the flyback power supply circuit 100 receives the input voltage Vin, and converts it to the output voltage Vout. The flyback power supply circuit 100 includes the aforementioned transformer circuit 102, a power switch circuit 103, an opto-coupler circuit 104, a primary side control circuit 105, a current sense circuit 106, and a secondary side control circuit 107. The primary side control circuit 105 generates an operation signal GATE according to a current sense signal CS generated by the current sense circuit 106 and a target control signal COMP generated by the opto-coupler circuit 104, for operating a power switch of the power switch circuit 103 to convert the input voltage Vin to the output voltage Vout. The transformer circuit 102 includes a primary winding W1 and a secondary winding W2. The secondary winding W2 is electrically connected to a ground level GND, and the primary winding W1 is electrically connected to a reference level REF. The current sense circuit 106 generates the current sense signal CS according to a power switch current flowing through the power switch of the power switch circuit 103. The secondary side control circuit 107 adjusts the target control signal COMP according to a setting signal SET and the programmable output voltage Vout, to regulate the programmable output voltage Vout or to change a target level of the programmable output voltage Vout.
For example, referring to the upper diagram of FIG. 1B, which shows the signal waveforms of the target control signal COMP1 and the programmable output voltage Vout1 in a normal operation. When the flyback power supply circuit 100 changes the level of the programmable output voltage Vout1 at the output node OUT from the level Vtrgt1 to the level Vtrgt2 according to the setting signal SET, referring to FIG. 1A, the secondary side control circuit 107 receives the setting signal SET in a digital form by pins D+ and D−, and converts it to a setting operation signal SETOP at pins O1 and O2. The setting operation signal SETOP controls the switches S1 and S2 in the secondary side control circuit 107, to determine the resistance of a series circuit of resistors R1, R2, R3, and R4, so as to determine the target control signal COMP. When the setting signal SET indicates that the level of the output voltage Vout1 should be regulated to the level Vtrgt1, the target control signal COMP1 will be set to a maximum level MAX at an initial stage; and when the programmable output voltage Vout1 achieves the level Vtrgt1, the level of the target control signal COMP1 is decreased, and the level of the programmable output voltage Vout1 is regulated at the level Vtrgt1 by feedback control through the current sense signal CS and the target control signal COMP1.
Next, when the setting signal SET indicates that the level of the output voltage Vout1 should be changed from the level Vtrgt1 to the level Vtrgt2, the target control signal COMP1 will be set to the maximum level MAX again; and when the programmable output voltage Vout1 achieves the level Vtrgt2, the level of the target control signal COMP1 is decreased, and the level of the programmable output voltage Vout1 is regulated at the level Vtrgt2 by feedback control through the current sense signal CS and the target control signal COMP1. When there is a sudden drop of the programmable output voltage Vout1 for any reason such as a sudden heavy loading requirement, as shown by “glitch1” in the figure, the target control signal COMP1 will be set to the maximum level again, to increase the level of the programmable output voltage Vout1 to the level Vtrgt2 by feedback control. On the other hand, when there is a sudden increase of the programmable output voltage Vout1, as shown by “glitch2” in the figure, the target control signal COMP1 will be decreased, to decrease the level of the programmable output voltage Vout1 to the level Vtrgt2 by feedback control.
In the above description, the feedback control by the target control signal COMP1 is achieved by means of an opto-coupler device in the opto-coupler circuit 104. More specifically, when the programmable output voltage Vout1 is too high, for example higher than the level Vtrgt1 set by the setting signal SET, the current flowing through the opto-coupler device is controlled to be relatively higher, such that the target control signal COMP1 is relatively lower, whereby the operation signal GATE operates correspondingly to decrease the programmable output voltage Vout1. On the other hand, when the programmable output voltage Vout1 is too low, for example lower than the level Vtrgt1 set by the setting signal SET, the current flowing through the opto-coupler device is controlled to be relatively lower, such that the target control signal COMP1 is relatively higher, whereby the operation signal GATE operates correspondingly to decrease the programmable output voltage Vout1.
When an over voltage condition occurs, the prior art circuit operates as below. An over voltage condition may occur, for example, when the opto-coupler device of the opto-coupler circuit 104 is damaged to form an open circuit; the target control signal COMP2 will be maintained at the maximum level MAX, and the level of the programmable output voltage Vout2 will keep increasing. Referring to the lower diagram of FIG. 1B which shows signal waveforms of the target control signal COMP2 and the programmable output voltage Vout2, wherein an over voltage condition occurs when the programmable output voltage Vout2 is maintained at the level Vtrgt1 or when the level of the programmable output voltage Vout2 is being changed from the level Vtrgt1 to the level Vtrgt2. In the beginning, the circuit operates normally, so when the setting signal SET indicates that the level of the output voltage Vout2 should be regulated to the level Vtrgt1, the target control signal COMP2 is set to the maximum level MAX at the initial stage, and when the programmable output voltage Vout2 achieves the level Vtrgt1, the level of the target control signal COMP2 is decreased, and the level of the programmable output voltage Vout2 is regulated at the level Vtrgt1 by feedback control.
Thereafter, for example in the process of maintaining the level of the programmable output voltage Vout2 at the level Vtrgt1, or in the process of changing the level of the programmable output voltage Vout2 from the level Vtrgt1 to the level Vtrgt2, an over voltage condition occurs. The target control signal COMP2 is changed to and maintained at the maximum level MAX, so the programmable output voltage Vout2 keeps increasing, and even over the level Vtrgt2, which can be very dangerous.
In the prior art, the countermeasure is to count the period wherein the target control signal COMP2 is maintained at the maximum level MAX, and when the target control signal COMP2 is maintained at the maximum level MAX for a period longer than a predetermined over voltage time OVT, the primary control circuit 105 will force the target control signal COMP2 decreasing for a “hiccup time” period. After the hiccup time period, the primary control circuit 105 will change the target control signal COMP2 to the maximum level MAX, to increase the output voltage Vout2 again.
The aforementioned over voltage protection mechanism in the prior art can not adequately protect the circuitry; the circuitry is often still damaged because the programmable output voltage Vout keeps increasing in the over voltage time OVT and becomes too high. FIG. 2 shows a prior art programmable flyback power supply circuit 200, which proposes a solution to the aforementioned problem by providing a back-up. As shown in FIG. 2, the flyback power supply circuit 200 is different from the flyback power supply circuit 100 in that, the flyback power supply circuit 200 includes an opto-coupler circuit 204 which has two opto-coupler devices 204a and 204b connected in parallel. A secondary side control circuit 207 is coupled to light emitter parts of the opto-coupler devices 204a and 204b, and the primary side control circuit 205 is connected to light receiver parts of the opto-coupler devices 204a and 204b. Therefore, when one of the opto-coupler devices 204a and 204b is damaged to form an open circuit, the other one can maintain the normal operation, so that the target control signal COMP can be correctly generated according to the setting signal SET and the programmable output voltage Vout.
Obviously, the prior art of FIG. 2 greatly increases the cost and the space of the circuitry, and it only provides a limited improvement over the prior art flyback power supply circuit of FIG. 1.
In view of the above, the present invention proposes a flyback power supply circuit with a programmable function and a control method thereof, which improves the over voltage protection mechanism.